package com.xmmj.main.viewmodel

import android.text.TextPaint
import android.text.style.ClickableSpan
import android.view.View
import android.widget.Toast
import com.xmmj.baselibrary.base.activity.mvvm.BaseViewModel
import com.xmmj.baselibrary.base.application.BaseApplication
import com.xmmj.common.router.RouteNavigator
import com.xmmj.main.model.MainModel

class PrivacyViewModel : BaseViewModel<MainModel>() {

    var spanPosition = intArrayOf(61, 69, 70, 76, 245, 253, 255, 260)

    var spanClicks = arrayListOf(
        PrivacyTextClick(),
        AgreementTextClick(),
        PrivacyTextClick(),
        AgreementTextClick()
    )

    //隐私政策点击事件
    class PrivacyTextClick : ClickableSpan() {
        override fun onClick(view: View) {

        }

        override fun updateDrawState(ds: TextPaint) {
            ds.isUnderlineText = false
        }
    }

    //用户协议点击事件
    class AgreementTextClick : ClickableSpan() {
        override fun onClick(view: View) {

        }

        override fun updateDrawState(ds: TextPaint) {
            ds.isUnderlineText = false
        }
    }
}